home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / 3d_howto / 3d.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-09-06  |  5.3 KB  |  189 lines

  1. VERSION 2.00
  2. Begin Form Form3D 
  3.    BackColor       =   &H00FFFFFF&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "3D look examples"
  6.    ClientHeight    =   6060
  7.    ClientLeft      =   2430
  8.    ClientTop       =   1740
  9.    ClientWidth     =   5625
  10.    ControlBox      =   0   'False
  11.    Height          =   6465
  12.    Left            =   2370
  13.    LinkMode        =   1  'Source
  14.    LinkTopic       =   "Form1"
  15.    MaxButton       =   0   'False
  16.    MinButton       =   0   'False
  17.    ScaleHeight     =   6060
  18.    ScaleWidth      =   5625
  19.    Top             =   1395
  20.    Width           =   5745
  21.    Begin PictureBox Picture1 
  22.       AutoRedraw      =   -1  'True
  23.       AutoSize        =   -1  'True
  24.       BorderStyle     =   0  'None
  25.       Height          =   480
  26.       Left            =   2280
  27.       Picture         =   3D.FRX:0000
  28.       ScaleHeight     =   480
  29.       ScaleWidth      =   480
  30.       TabIndex        =   11
  31.       Top             =   3960
  32.       Width           =   480
  33.    End
  34.    Begin CommandButton Command3 
  35.       Caption         =   "&Quit"
  36.       Height          =   345
  37.       Left            =   300
  38.       TabIndex        =   10
  39.       Top             =   5400
  40.       Width           =   855
  41.    End
  42.    Begin CommandButton Command2 
  43.       Caption         =   "&Recess"
  44.       Height          =   345
  45.       Left            =   300
  46.       TabIndex        =   8
  47.       Top             =   4710
  48.       Width           =   855
  49.    End
  50.    Begin CommandButton Command1 
  51.       Caption         =   "R&aise"
  52.       Height          =   345
  53.       Left            =   300
  54.       TabIndex        =   5
  55.       Top             =   4020
  56.       Width           =   855
  57.    End
  58.    Begin ListBox List1 
  59.       Height          =   1005
  60.       Left            =   300
  61.       TabIndex        =   1
  62.       Top             =   1830
  63.       Width           =   2865
  64.    End
  65.    Begin TextBox Text1 
  66.       Height          =   285
  67.       Left            =   300
  68.       TabIndex        =   0
  69.       Text            =   "3 D Text"
  70.       Top             =   1170
  71.       Width           =   2865
  72.    End
  73.    Begin HScrollBar HScroll1 
  74.       Height          =   375
  75.       Left            =   840
  76.       Max             =   10
  77.       TabIndex        =   9
  78.       Top             =   3210
  79.       Width           =   1695
  80.    End
  81.    Begin CheckBox Check2 
  82.       Caption         =   "3D Check2"
  83.       Height          =   270
  84.       Left            =   1830
  85.       TabIndex        =   6
  86.       Top             =   5460
  87.       Width           =   1395
  88.    End
  89.    Begin FileListBox File1 
  90.       Height          =   4515
  91.       Left            =   3630
  92.       TabIndex        =   3
  93.       Top             =   1290
  94.       Width           =   1695
  95.    End
  96.    Begin CheckBox Check1 
  97.       Caption         =   "3D Check1"
  98.       Height          =   270
  99.       Left            =   1830
  100.       TabIndex        =   4
  101.       Top             =   4830
  102.       Width           =   1395
  103.    End
  104.    Begin DriveListBox Drive1 
  105.       Height          =   315
  106.       Left            =   3630
  107.       TabIndex        =   2
  108.       Top             =   300
  109.       Width           =   1695
  110.    End
  111.    Begin Frame Frame1 
  112.       Caption         =   "3D Frame"
  113.       Height          =   675
  114.       Left            =   300
  115.       TabIndex        =   7
  116.       Top             =   150
  117.       Width           =   2865
  118.    End
  119. Sub Check1_Click ()
  120. End Sub
  121. Sub Check2_Click ()
  122. End Sub
  123. Sub Command1_Click ()
  124.     PaintFrames CTLRAISED
  125.     Frame1.Caption = "The Raised look"
  126. End Sub
  127. Sub Command2_Click ()
  128.     PaintFrames CTLRECESSED
  129.     Frame1.Caption = "The cellar look"
  130. End Sub
  131. Sub Command3_Click ()
  132.     Me.Hide
  133.     MsgBox "C Ya!"
  134.     End
  135. End Sub
  136. Sub Form_Load ()
  137.     BackColor = RGB(BKGNDGRAY, BKGNDGRAY, BKGNDGRAY)
  138.     FrameWidth = DEFAULTWIDTH
  139.     HScroll1.Value = FrameWidth
  140.     List1.AddItem "Move the ScroolBar"
  141.     List1.AddItem "and click on Recess"
  142.     List1.AddItem "or Raise to redraw"
  143.     List1.AddItem "the new 3D commands."
  144.     List1.AddItem "_________________________"
  145.     List1.AddItem "The Visual Basic Depot"
  146.     List1.AddItem "FIDO 1:2380/410.0"
  147.     List1.AddItem "Flatrock, MI"
  148.     List1.AddItem "CIS: 72400,505"
  149.     List1.AddItem "AOL: WISECARVER"
  150.     Show
  151. End Sub
  152. Sub Form_Paint ()
  153.     PaintFrames CTLRAISED
  154. End Sub
  155. Sub HScroll1_Change ()
  156.     FrameWidth = HScroll1.Value
  157.     Text1.Text = "Value of HScroll1 is " + Str$(FrameWidth)
  158. End Sub
  159. Sub InitCtl (C As Control, InOut As Integer)
  160.     If TypeOf C Is HScrollBar Then      ' No BackColor for Scroll Bars
  161.     Else
  162.         C.BackColor = C.Parent.BackColor        ' Set to Forms Backcolor
  163.     End If
  164.     HighLight C, InOut
  165. End Sub
  166. Sub PaintFrames (InOut As Integer)
  167. ' Convert All forms to Single View.
  168.     Cls  ' Remove Old Frames
  169.     InitCtl Frame1, InOut
  170.     InitCtl HScroll1, InOut
  171.     InitCtl Text1, InOut
  172.     InitCtl List1, InOut
  173.     InitCtl Command1, InOut
  174.     InitCtl Command2, InOut
  175.     InitCtl Command3, InOut
  176.     InitCtl Drive1, InOut
  177.     InitCtl File1, InOut
  178.     InitCtl Check1, InOut
  179.     InitCtl Check2, InOut
  180.     InitCtl Picture1, InOut
  181. ' Other elements that need initialization.
  182.     Picture1.Refresh                ' Repaint Picture Box
  183. End Sub
  184. Sub Picture1_Click ()
  185. End Sub
  186. Sub Text1_Change ()
  187. Frame1.Caption = Text1.Text
  188. End Sub
  189.